<template>
    <div class="index-bottom">
        <el-button @click="toCommittee" style="width: 33%; margin: 0;">债委会</el-button><el-button @click="toCase" style="width: 34%; margin: 0;">案件信息</el-button><el-button @click="toCreditor" style="width: 33%; margin: 0;">我的债权</el-button>
    </div>
</template>

<script>
    import util from 'assets/js/util.js'

    export default {
        data() {
            return {
                caseId: 0,
                creditorId: 0
            }
        },
        mounted() {
            //this.caseId = util.getUrlParam(document.location.href, 'caseId');
            this.creditorId = util.getUrlParam(document.location.href, 'creditorId');
        },
        methods: {
            toCommittee: function () {
                const _self = this;
                util.ajax({
                    url: `/case/committee`,
                    success: function (data) {
                        if (data.data === null) {
                                _self.$message({
                                    message: '尚未选举成功!',
                                    center: true
                                })
                        } else{
                            window.location.href = '../committee/committee-over.html?' ;
                        }
                    }
                });
            },

            toCase: function () {
                window.location.href = '../main/case.html?' ;
            },

            toCreditor: function () {
                window.location.href = '../creditor/creditor.html?';
            }
        }
    }
</script>

<style>
    .index-bottom {
        position: fixed;
        color: white;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 999;
    }
</style>
